import axios from '@/libs/axios1'
let jsonHeaders = {
  'content-type': 'application/json;charset=UTF-8'
}

//  查询列表信息
export const queryTeamList = (sceneId, params) => {
  return axios({
    url: `/compete/pub/${sceneId}`,
    method: 'get',
    params,
    headers: jsonHeaders
  })
}


// 查询可切换ip列表 /pub/one/{sceneId}/{teamId}

export const querySwitchIpList = (sceneId, teamId) => {
  return axios({
    url: `/compete/pub/one/${sceneId}/${teamId}`,
    method: 'get',
    headers: jsonHeaders
  })
}

//  切换外网ip
export const switchOuterIp = (sceneId, data) => {
  return axios({
    url: `/compete/pub/change/${sceneId}`,
    method: 'post',
    data,
    headers: jsonHeaders
  })
}


// 查询可用公网ip数
export const queryUsableNumber = (sceneId) => {
  return axios({
    url: `/compete/pub/getAvailableIpCount/${sceneId}`,
    method: 'get',
    headers: jsonHeaders
  })
}


// 外网操作列表查询 
export const queryLogsList = (params) => {
  return axios({
    url: `/compete/pub/log`,
    method: 'get',
    params,
    headers: jsonHeaders
  })
}

// 解绑ip
export const unbundleIp = (sceneId) => {
  return axios({
    url: `/compete/pub/unBind/${sceneId}`,
    method: 'post',
    headers: jsonHeaders
  })
}